﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace GameName1
{
    class SpaceShipStateNormal : SpaceShipState
    {

        public override void Update(GameTime gameTime, SpaceShip spaceShip)
        {
            spaceShip.GetInput();
        }

        public override void Draw(SpriteBatch spriteBatch, SpaceShip spaceShip)
        {
            spriteBatch.Draw(spaceShip.Sprite, spaceShip.GetDestinationRectangle(), spaceShip.GetSourceRectangle(), new Color(0,255,0));
        }

        public override void HandleHit(IHittable other, GameTime colissionTime, SpaceShip spaceShip)
        {
            GameplayScene.Lives--;
            spaceShip.ReloadTime = 250;
            spaceShip.SpaceShipState = new SpaceShipStateRecovering(colissionTime);
        }
    }
}
